<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Find and Replace</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
#table {
	border: 1px solid black ;
	margin-right: auto;
	margin-left: auto;
}
.label {
	font: bold 0.9em Verdana, Arial, Sans-Serif;
	text-align: left;
}
.box {
	font: bold 0.9em Verdana, Arial, Sans-Serif;
	text-align: right;
}
.buttons {
	font: bold 0.9em Verdana, Arial, Sans-Serif;
	text-align: center;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--
function findReplace() {
	var find = document.findReplaceForm.find.value;
	var replace = document.findReplaceForm.replace.value;
	if ((typeof(document.findReplaceForm.caseSensitive) != 'undefined') 
		&& document.findReplaceForm.caseSensitive.checked)
		var caseSensitive = "on";
	else
		var caseSensitive = "off";
	if ((typeof(document.findReplaceForm.wholeWord) != 'undefined') 
		&& document.findReplaceForm.wholeWord.checked)
		var wholeWord = "on";
	else
		var wholeWord = "off";
	if(!find || !replace)
		alert("Missing input");
	else
	{
		window.opener.findReplace('paperText', find, replace, caseSensitive, wholeWord);
		window.close();
	}
}
//-->
</script>
</head>

<body>

<form name="findReplaceForm">
<table cellpadding="4" cellspacing="0" border="0" id="table">
	<tr>
		<td class='label'>Find:</td>
		<td class='box'><input name="find" type="text" id="find" value="" size="20"></td>
	</tr>
	<tr>
		<td class='label'>Replace with:</td>
		<td class='box'><input name="replace" type="text" id="replace" value="" size="20"></td>
	</tr>
	<tr>
		<td>Case-sensitive: <input type="checkbox" name="caseSensitive" id="caseSensitive">
		</td>
		<td>Whole word: <input type="checkbox" name="wholeWord" id="wholeWord" CHECKED>
		</td>
	</tr>
	<tr>
	<td>&nbsp;</td>
	</tr>
	<tr>
		<td colspan = '2' class='buttons'>
			<input type="button" value="Find and Replace" onClick="findReplace();" />
			<input type="button" value="Cancel" onClick="window.close();" />
		</td>
	</tr>
</table>

</form>

</body>
</html>
